<template>
	<block>
		<view v-if="display" style="position: fixed; left:0; top: 0; right:0; bottom:0; height:100vh; width: 100vw; background-color:#000; opacity:.3; z-index:9998;" @touchmove.stop="stopMove">
		</view>
		<view class='cu-load load-modal' style="box-shadow:none; z-index:9999;" v-if="display" @touchmove.stop="stopMove">
			<image src='@/static/img/bear.png' class='png' mode='aspectFit'></image>
			<view class='text-gray text-sm'>请稍后...</view>
		</view>
	</block>
</template>

<script>
	export default {
		name: "hxt-loading",
		options: {
			styleIsolation: 'apply-shared'
		},
		props: {
			show: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				display: false
			};
		},
		watch: {
			show: function(val) {
				console.log(val,'show');
				this.display = val == false ? false : true;
			}
		},
		methods: {
			stopMove: function() {
				return;
			}
		}
	}
</script>

<style>

</style>
